{extend name="admin@admin:base_admin_builder" /}
{block name="head"}
<script type="text/javascript" src="__STATIC__/onepeter/lib/ueditor/ueditor.config.js"></script>
<script>
    Object.assign(window.UEDITOR_CONFIG,{
        toolbars: [[
            'fullscreen', 'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
            'directionalityltr', 'directionalityrtl', 'indent', '|',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
            'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
            'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
            'print', 'preview', 'searchreplace', 'help', 'drafts'
        ]]
    });
</script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/onepeter/lib/ueditor/ueditor.all.min.js"></script>
{/block}
{block name="style"}
<style>
    .button-group {
        margin-top: 10px;
    }

    .key-item {
        padding: 10px 0px;
    }
    .key-title , .key-sub-title{
        vertical-align: top;
    }
</style>
{/block}
{block name="content"}
    <div target-form="true" class="form-inline" action="{$_postUrl}" method="post">
        <div class="key-group">
            {peter:foreach exp="$_keyList as $_i => $_item"}
                <div class="key-item">
                    <div>
                        <label class="key-title">
                            {$_item.title}
                            {peter:if exp="$_item['subtitle']"}
                                <span class="key-sub-title">({$_item.subtitle})</span>
                            {/peter:if}
                        </label>
                    </div>
                    {switch name="_item.type"}
                        {include file="admin@config_builder_widget:text" /}
                        {include file="admin@config_builder_widget:readonly" /}
                        {include file="admin@config_builder_widget:textarea" /}
                        {include file="admin@config_builder_widget:editor" /}
                        {include file="admin@config_builder_widget:multiimage" /}
                        {include file="admin@config_builder_widget:singleimage" /}
                        {include file="admin@config_builder_widget:multifile" /}
                        {include file="admin@config_builder_widget:singlefile" /}
                        {include file="admin@config_builder_widget:select" /}
                    {/switch}

                </div>
            {/peter:foreach}
        </div>

        <div class="button-group">
            {peter:foreach exp="$_buttonList as $_item"}
                <button url="{$_postUrl}" {$_item.attr}>{$_item.title}</button>
            {/peter:foreach}
        </div>
    </div>
{/block}